<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增使用记录')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-fCarUse-add">
            <input name="carId" th:value="${carId}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">出发时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="startTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">归行时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="endTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">出发地：</label>
                <div class="col-sm-8">
                    <input name="startLocation" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">目的地：</label>
                <div class="col-sm-8">
                    <input name="endLocation" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">使用人：</label>
                <div class="col-sm-8">
                    <input name="carUser" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">事由：</label>
                <div class="col-sm-8">
                    <textarea name="reason" class="form-control" required></textarea>
                </div>
            </div>


            <div class="form-group">
                <label class="col-sm-3 control-label">起里程表数：</label>
                <div class="col-sm-8">
                    <input name="startNumber"  class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">止里程表数：</label>
                <div class="col-sm-8">
                    <input name="endNumber" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">行驶里程：</label>
                <div class="col-sm-8">
                    <input name="totalNumber" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">收费金额：</label>
                <div class="col-sm-8">
                    <input name="price" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">加油量：</label>
                <div class="col-sm-8">
                    <input name="jiayou" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">加油金额：</label>
                <div class="col-sm-8">
                    <input name="jiayouPrice" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">停车费用：</label>
                <div class="col-sm-8">
                    <input name="tingchePrice" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">维修费用：</label>
                <div class="col-sm-8">
                    <input name="weixiuPrice" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">其他费用：</label>
                <div class="col-sm-8">
                    <input name="qitaPrice" class="form-control" type="text">
                </div>
            </div>



            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="remark" class="form-control"></textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "financial/fCarUse"
        $("#form-fCarUse-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-fCarUse-add').serialize());
            }
        }

        $("input[name='startTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='endTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>